package com.aliyun.oss.userController;

import com.aliyun.oss.Constants.Constants;
import com.aliyun.oss.config.RedisConfiguration;
import com.aliyun.oss.pojo.Vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("userShopController")
@RequestMapping("/user/shop")
public class ShopController {
    public static final String KEY="SHOP_STATUS";

    @Autowired
    RedisTemplate redisTemplate;
    @GetMapping("/status")
    public ResultVO getStatus(){

        Integer status = (Integer) redisTemplate.opsForValue().get("SHOP_STATUS");
        return ResultVO.success(status);
    }
}
